package com.kust.smarthome.web.common.exception;

public class XRKException extends Exception {

    private int code = 500;

    public XRKException() { }

    public XRKException(String message) {
        super(message);
    }

    public XRKException(String message, Throwable cause) {
        super(message, cause);
    }

    public XRKException(Throwable cause) {
        super(cause);
    }

    public XRKException(String message, Throwable cause,
                            boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public XRKException(int code) {
        this.code = code;
    }

    public XRKException(String message, int code) {
        super(message);
        this.code = code;
    }

    public XRKException(String message, Throwable cause,
                            int code) {
        super(message, cause);
        this.code = code;
    }

    public XRKException(Throwable cause, int code) {
        super(cause);
        this.code = code;
    }

    public XRKException(String message, Throwable cause,
                            boolean enableSuppression, boolean writableStackTrace, int code) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}
